﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
          // CollectionTester ct = new CollectionTester ();
            List<string> spisok;
            spisok = new List<string>();
           string [] Array = new string[1000000];
           Stopwatch sw = new Stopwatch();
           Stopwatch sw1 = new Stopwatch();
           sw1.Restart();
           for (int i = 0; i < 1000000; i++)
           {
               Array[i] = DateTime.Now.TimeOfDay.ToString();
           }
           sw1.Stop();
           
            //foreach (string array in Array)
           //{
             //  Console.WriteLine(array);
           //}
           sw.Restart();
           for (int i = 0; i < 1000000; i++)
           {
               spisok.Add(DateTime.Now.TimeOfDay.ToString());
           }
           sw.Stop();
           Console.WriteLine(sw.ElapsedMilliseconds + "\n" + sw1.ElapsedMilliseconds);
           Console.ReadLine();


            
        }
    }

    class CollectionTester
    {
        public string[] Array;
    }
}
